package My_Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 周斌
 * Date: 2024-03-11
 * Time: 21:01
 */
public class LinkedStackTest {
    public static void main(String[] args) {
        LinkedStack linkedStack = new LinkedStack();
        //1.采用头插法
        /*linkedStack.push1(11);
        linkedStack.push1(22);
        linkedStack.push1(33);
        linkedStack.push1(44);
        System.out.println(linkedStack.pop1());
        System.out.println(linkedStack.peek());*/
        //2.采用尾差法
        linkedStack.push2(12);
        linkedStack.push2(23);
        linkedStack.push2(34);
        linkedStack.push2(45);
        System.out.println(linkedStack.pop2());
        System.out.println(linkedStack.peek2());
    }
}
